package com.flyme.common.poi.util;

import org.apache.commons.lang3.StringUtils;

import java.util.HashMap;
import java.util.Map;

/**
 * @author yanxin.li@ucarinc.com
 */
public class WordTemplateData {

    private Map<String, String> plainTextData;
    private Map<String, String> tableData;

    public WordTemplateData() {
        plainTextData = new HashMap<String, String>();
        tableData = new HashMap<String, String>();
    }

    public void addPlainTextData(String key, String value) {
        if (StringUtils.isNotBlank(key)) {
            this.plainTextData.put(key, value);
        }
    }

    public void addTableData(String key, String value) {
        if (StringUtils.isNotBlank(key)) {
            this.tableData.put(key, value);
        }
    }

    public Map<String, String> getPlainTextData() {
        return plainTextData;
    }

    public void setPlainTextData(Map<String, String> plainTextData) {
        this.plainTextData = plainTextData;
    }

    public Map<String, String> getTableData() {
        return tableData;
    }

    public void setTableData(Map<String, String> tableData) {
        this.tableData = tableData;
    }
}
